import React from 'react';
import darkBlue from '@/src/assets/comps/other/firstHeader/title_icon_darkBlue.png';
import PropTypes from 'prop-types';

class HOneHeader extends React.Component {
  static defaultProps = {
    InsertPagination: false,
    label: '',
    style: {},
  };
  render() {
    return (
      <>
        <h2
          style={
            this.props.InsertPagination
              ? { fontWeight: 'bold', fontSize: '10.5pt', ...this.props.style, pageBreakBefore: 'always' }
              : { fontWeight: 'bold', fontSize: '10.5pt', ...this.props.style }
          }
        >
          <img width={14} height={14} src={darkBlue} />
          {this.props.label}
        </h2>
      </>
    );
  }
}

HOneHeader.propsTypes = {
  label: PropTypes.string, //
  style: PropTypes.object, //
  InsertPagination: PropTypes.bool, // 是否插入分页
};
export default HOneHeader;
